import { createBrowserRouter, Navigate } from "react-router-dom";
import Index from "../components/Index";
import Home from "../components/home page/home";
import Chat from "../chat/Index";
import My from "../my/Index";
import Order from "../my/Order";
import Buy from "../my/Buy";
import Sell from "../my/Sell";
import Send from "../my/Send";
import Collection from "../my/Collection";
import Yao from "../my/Yao";
import Hui from "../my/Hui";
import Gui from "../my/Gui";
import Help from "../my/Help";
import ChatXiang from "../chat/Xiang";
import Search from "../components/search/search";
import High from "../components/high quality/Index";
import Login from "../login/Login";
import Recommend from '../components/recommend/recommend'
import Topic from '../components/topic/topic'
import Type from '../components/type/type'
import Result from '../components/result/result'
import Register from '../components/register/register'
import Show from "../components/gold mine/Show";
import Bu from "../components/gold mine/Bu";
import Gold from "../components/gold mine/Gold";
import Set from "../my/Set";

import Sao from "../components/lmyPublic/Sao";
// 扫码发书

import CellBook from "../components/lmyPublic/CellBook";
import Public from "../components/lmyPublic/Public";
// 回收
import Recovery from '../components/lmyPublic/Recovery'
// 收货地址
import Address from '../components/lmyPublic/Address'
import Addr1 from '../components/lmyPublic/Addr'
// 我的订单
import MyOrder from '../components/lmyPublic/Orderss'
const router = createBrowserRouter([
  {
    path: "/",
    element: <Index></Index>,
    children: [
      {
        path: "/",
        element: <Home></Home>,
      },
      {
        path: "/Chat",
        element: <Chat></Chat>,
      },
      {
        path: "/My",
        element: <My></My>,
      },
      {
        path: "/gshow",
        element: <Show></Show>
      },
      {
        path: "/Order",
        element: <Order></Order>,
        children: [
          {
            path: "/Order/Buy",
            element: <Buy></Buy>,
          },
          {
            path: "/Order/Sell",
            element: <Sell></Sell>,
          },
          {
            path: "/Order/Send",
            element: <Send></Send>,
          },
          {
            path: "/Order/Collection",
            element: <Collection></Collection>,
          },
        ],
      },
    ],
  },
  {
    path: "/bu",
    element: <Bu></Bu>
  },
  {
    path: "/gold",
    element: <Gold></Gold>
  },
  {
    path: "/Login",
    element: <Login></Login>,
  },
  {
    path: "/Register",
    element: <Register></Register>,
  },
  {
    path: "/Yao",
    element: <Yao></Yao>,
  },
  {
    path: "/Hui",
    element: <Hui></Hui>,
  },
  {
    path: "/Gui",
    element: <Gui></Gui>,
  },
  {
    path: "/Set",
    element: <Set></Set>,
  },
  {
    path: "/Search",
    element: <Search></Search>,
  },
  {
    path: "/Recommend",
    element: <Recommend></Recommend>,
  },
  {
    path: "/topic",
    element: <Topic></Topic>,
  },
  {
    path: "/type",
    element: <Type></Type>,
  },
  {
    path: "/Help",
    element: <Help></Help>,
  },
  {
    path: "/ChatXiang",
    element: <ChatXiang></ChatXiang>,
  },
  {
    path: "/High",
    element: <High></High>,
  },
  {
    path: '/result',
    element: <Result></Result>
  },
  {
    path: '/register',
    element: <Register></Register>
  },
  // 扫码
  {
    path: "/sao",
    element: <Sao></Sao>,
    children: [
      {
        path: "/sao/cellbook",
        element: <CellBook></CellBook>,
      },
      {
        path: "/sao/public",
        element: <Public></Public>,
      },
    ],
  },
  {
    path: "/cellbook",
    element: <CellBook></CellBook>,
  },
  {
    path: "/public",
    element: <Public></Public>,
  },
  // 回收
  {
    path: '/recovery',
    element: <Recovery></Recovery>,
  },
  // 收货地址
  {
    path: '/addr',
    element: <Address></Address>,
  },
  {
    path: '/addr1',
    element: <Addr1></Addr1>
  },
  // 我的订单
  {
    path: '/myorder',
    element: <MyOrder></MyOrder>
  }

]);

export default router;
